package BankTest;

public class Account {
    private int id;
    private String password="000000";
    private double balance;
    private static final double interestRate=0.01;
    private static final double minimumMoney=1000;
    private static int init=1001;  //自动生成id

    public Account(){
        id=init++;
    }
    public Account(String password,double balance){
        this();
        this.password=password;
        this.balance=balance;
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", password='" + password + '\'' +
                ", balance=" + balance +
                '}';
    }

    public int getId() {
        return id;
    }
    public String getPassword() {
        return password;
    }
    public double getBalance() {
        return balance;
    }
    public static int getInit() {
        return init;
    }
    public void setPassword(String password) {
        this.password = password;
    }
}
